package cn.signalpha.modules.com.entity;

import cn.signalpha.core.swagger.ApiModelPropertyEnum;
import cn.signalpha.modules.com.entity.enums.UserSignTypeEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 实体类
 *
 * @author signalpha
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("com_user_sign")
@ApiModel(value = "UserSign对象", description = "签到记录")
public class UserSign implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Long userId;

    @ApiModelProperty(value = "类型")
	@ApiModelPropertyEnum(UserSignTypeEnum.class)
    private Integer type;

    @ApiModelProperty(value = "经验")
    private Integer ext;

	@ApiModelProperty(value = "积分")
	private Double integral;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "操作时间(签到和补签的具体日期)")
    private LocalDate operationTime;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

}
